package com.zbb.user.api;

import com.zbb.base.model.Result;
import com.zbb.user.model.dto.CommentDto;
import com.zbb.user.service.CreditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 信誉表 前端控制器
 * </p>
 *
 * @author itcast
 */
@Slf4j
@RestController
@RequestMapping
@Api(value = "评价",tags = "评价/更改评价")
public class CreditController {


    @Autowired
    private CreditService  creditService;


    @ApiOperation("评价接口")
    @PostMapping("reqEvaluate")
    public Result comment(@RequestBody CommentDto commentDto) {
        creditService.insertCredit(commentDto);
        return Result.ok();
    }
}
